<?php
/*
Enlightener V0.09 Codename Kerstpiek.
This software is copyrighted 2005, Michel Francois Bouwmans. All rights reserved.
*/

if (empty($apik)){
header("HTTP/1.1 402 Payment Required");
die();
}

mysql_connect("localhost", $username, $password);
mysql_select_db($database);

$res = mysql_query("SELECT * FROM enlight_apik WHERE key = '$apik'");

$usern = mysql_result($res, 0, "user");
$pass = mysql_result($res, 0, "pass");

if (!$res){
header("HTTP/1.1 503 Service Unavailable");
die();
}

if ($usern === !$uname or $pass === !$passwd){
header("HTTP/1.1 401 Authorization Required");
die();
}
?>
